home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CD ROM Paradise Collection 4
/
CD ROM Paradise Collection 4 1995 Nov.iso
/
edit
/
aurora2.zip
/
LONGLINE.AML
< prev
next >
Wrap
Text File
|
1995-01-26
|
1KB
|
46 lines
// ───────────────────────────────────────────────────────────────────
// The Aurora Editor v2.0
// Copyright 1993-1995 nuText Systems. All Rights Reserved Worldwide.
//
// Find the longest line
//
// This macro moves the cursor to the end of the longest line in
// the current window
// ───────────────────────────────────────────────────────────────────
// compile time macros and function definitions
include bootpath "define.aml"
var maxlength
// test for edit windows
if not wintype? "edit" then
msgbox "Edit windows only!"
return
end
// make cursor position undo-able and goto file top
undocursor
row 1
// do for all lines in the file
repeat
// if the line length > current longest line..
if getlinelen > maxlength then
// ..then make it the longest line and save the row
maxlength = getlinelen
longestline = getrow
end
until not down
// goto to the end of the longest line
row longestline
col getlinelen + 1
// use "onfound" (in EXT.AML) to adjust the window view if needed
send "onfound"